package kingone.phone_store_spring_practice.enums;

import lombok.Getter;

/*此处是将在对Result进行操作时可能会出现的情况进行集中管理。*/
@Getter
public enum ResultEnum {
    //定义结果情况的枚举
    PHONE_STOCK_ERROR(0,"手机库存不足"),
    ORDER_NOT_EXIT(1,"订单不存在"),
    SPECS_NOT_EXIT(2,"规格不存在"),
    PHONE_NOT_EXIT(3,"手机不存在");


    //成员变量及构造方法
    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
